package study.rocketmq.consumer;

import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.stereotype.Component;
import study.rocketmq.sink.CustomerSink;
import study.rocketmq.vo.Order;

@Component
public class StreamListener {
    @org.springframework.cloud.stream.annotation.StreamListener(value = CustomerSink.ORDER_INPUT)
    public void receive(Order order) {
        System.out.println("receive- CustomerSink-order消息: " + order);
    }

    @org.springframework.cloud.stream.annotation.StreamListener(value = Sink.INPUT)
    public void receiveStrn(String msg) {
        System.out.println("receive- Sink -msg消息: " + msg);
    }



}
